﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
										xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Style x:Key="ScrollBarButtonLeft" TargetType="{x:Type RepeatButton}">
		<Setter Property="OverridesDefaultStyle" Value="True"/>
		<Setter Property="Focusable" Value="False"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<Border SnapsToDevicePixels="True" Background="Transparent">
						<Path Width="10" Height="10" x:Name="rcButton" Data="M 0,5 L10,10 L10,0 Z">
							<Path.Fill>
								<SolidColorBrush Color="#FFBFBFBF" x:Name="rcFillBrush"></SolidColorBrush>
							</Path.Fill>
						</Path>
					</Border>
					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="Control.MouseEnter">
							<BeginStoryboard>
								<Storyboard>
									<ColorAnimation From="#FFBFBFBF" To="#FFE5E5E5" Duration="0:0:0.1" Storyboard.TargetName="rcFillBrush" Storyboard.TargetProperty="Color">
									</ColorAnimation>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
						<EventTrigger RoutedEvent="Control.MouseLeave">
							<BeginStoryboard>
								<Storyboard>
									<ColorAnimation From="#FFE5E5E5" To="#BFBFBF" Duration="0:0:0.1" Storyboard.TargetName="rcFillBrush" Storyboard.TargetProperty="Color">
									</ColorAnimation>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ScrollBarButtonRight" TargetType="{x:Type RepeatButton}">
		<Setter Property="OverridesDefaultStyle" Value="True"/>
		<Setter Property="Focusable" Value="False"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<Border SnapsToDevicePixels="True" Background="Transparent">
						<Path Width="10" Height="10" x:Name="rcButton" Data="M 0,0 L10,5 L0,10 Z">
							<Path.Fill>
								<SolidColorBrush Color="#FFBFBFBF" x:Name="rcFillBrush"></SolidColorBrush>
							</Path.Fill>
						</Path>
					</Border>
					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="Control.MouseEnter">
							<BeginStoryboard>
								<Storyboard>
									<ColorAnimation From="#FFBFBFBF" To="#FFE5E5E5" Duration="0:0:0.1" Storyboard.TargetName="rcFillBrush" Storyboard.TargetProperty="Color">
									</ColorAnimation>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
						<EventTrigger RoutedEvent="Control.MouseLeave">
							<BeginStoryboard>
								<Storyboard>
									<ColorAnimation From="#FFE5E5E5" To="#BFBFBF" Duration="0:0:0.1" Storyboard.TargetName="rcFillBrush" Storyboard.TargetProperty="Color">
									</ColorAnimation>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
		<Setter Property="OverridesDefaultStyle" Value="True"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Thumb}">
					<Border Background="Transparent" SnapsToDevicePixels="True">
						<Border CornerRadius="5" Margin="5">
							<Border.Background>
								<SolidColorBrush x:Name="thumbBackground" Color="{StaticResource gray}"/>
							</Border.Background>
						</Border>
					</Border>
					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="Control.MouseEnter">
							<BeginStoryboard>
								<Storyboard>
									<ColorAnimation From="{StaticResource gray}" To="{StaticResource lightGray}" Duration="0:0:0.1" Storyboard.TargetName="thumbBackground" Storyboard.TargetProperty="Color"/>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
						<EventTrigger RoutedEvent="Control.MouseLeave">
							<BeginStoryboard>
								<Storyboard>
									<ColorAnimation From="{StaticResource lightGray}" To="{StaticResource gray}" Duration="0:0:0.1" Storyboard.TargetName="thumbBackground" Storyboard.TargetProperty="Color"/>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
		<Setter Property="OverridesDefaultStyle" Value="True"/>
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="Focusable" Value="False"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="{x:Type ScrollBar}">
		<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
		<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="Width" Value="Auto"/>
		<Setter Property="MinWidth" Value="0"/>
		<Setter Property="Height" Value="16"/>
		<Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ScrollBar}">
					<Grid x:Name="Bg" SnapsToDevicePixels="True" Background="#FF888888">
						<Grid.ColumnDefinitions>
							<ColumnDefinition MaxWidth="20"/>
							<ColumnDefinition Width="0.00001*"/>
							<ColumnDefinition MaxWidth="20"/>
						</Grid.ColumnDefinitions>
						<RepeatButton Style="{StaticResource ScrollBarButtonLeft}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineLeftCommand}"/>
						<Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Column="1">
							<Track.DecreaseRepeatButton>
								<RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageLeftCommand}"/>
							</Track.DecreaseRepeatButton>
							<Track.IncreaseRepeatButton>
								<RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageRightCommand}"/>
							</Track.IncreaseRepeatButton>
							<Track.Thumb>
								<Thumb Style="{StaticResource ScrollBarThumb}"/>
							</Track.Thumb>
						</Track>
						<RepeatButton Style="{StaticResource ScrollBarButtonRight}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Column="2" Command="{x:Static ScrollBar.LineRightCommand}"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>